import { ComponentClass } from 'react'
import Taro, { Component, Config } from '@tarojs/taro'
import { View, Text } from '@tarojs/components'
import { inject, observer } from '@tarojs/mobx'

import './index.less'

type PageOwnProps = {
  tokenStore: {
    token: string
  }
}
type PageState = {}

type IProps = PageOwnProps
interface Index {
  props: IProps
}

@inject('tokenStore')
@observer
class Index extends Component {
  // 配置页面window
  config: Config = {
    navigationBarTitleText: '酷丁鱼课堂'
  }

  render() {
    // const {tokenStore: {token}} =
    return (
      <View>
        <Text>home666 --- {this.props.tokenStore.token}</Text>
      </View>
    )
  }
}

export default Index as ComponentClass<PageOwnProps, PageState>
